<?php 
class Zend_View_Helper_DateFormat extends Zend_View_Helper_Abstract{
    
    public function dateFormat($date, $format="Y-m-d H:i:s"){

        //print_r($date);die();
        if (is_object($date) && $date instanceof DateTime){
            $strdate = date($format, $date->getTimestamp());
//            print ($date->getTimestamp());
        }else
            $strdate = $date;

        return date($format,strtotime($strdate));

    }
}